# id tagging method
#
# This determines how "inventory ids", strings conveying
# logical file identity, are computed for each file, directory
# and symbolic link.
#
# The choices are:
#
# tagline: inventory ids may be set using add-id, or omitted
#          (though tree-lint warns about omitted ids), or in
#          text files, set in a comment line near the top or
#          bottom of the file of a form like "<PUNCT> arch-tag: <STRING>".
#          Renames of files with no id are treated as a combined
#          add and delete (e.g., local changes can be lost).
#
# explicit: ids must be set using add-id.  Files passing the naming
#          conventions for source, but lacking add-id ids, are treated
#          as unrecognized files (see below).
#
# names: ids are not used.  All renames are treated as add+delete
#
# implicit: similar to tagline, but in addition, the id comment
#          may be of the form "<PUNCT> <BASENAME> - <STRING>", where
#          <BASENAME> is the basename of the file.   This method
#          is not recommended, but is retained for backwards
#          compatibility.
#

explicit

# disposition of untagged source files
#
# (NOTE: this option must follow the tagline/explicit/names/implicit
# directive.)
#
# By default, the explicit method treats untagged files matching the naming
# conventions for source files as unrecognized and the implicit and tagline
# methods treat such untagged files as source.
#
# You can override those default treatments of untagged files by specifying
# which inventory category (see below) should be used for files whose names
# suggest they are source but which lack ids.
#
# This feature may be especially convenient when importing sources that do
# not use file naming conventions that can be conveniently described with
# the regexps below.
#
# Uncomment one of these lines as appropriate to override the default:
#
# untagged-source source
untagged-source precious
# untagged-source backup
# untagged-source junk
# untagged-source unrecognized
#

# naming convention regexps
#
# For various commands, arch traverses your project trees, categorizing
# the files found there.  For example, when importing a project for
# the first time, this traversal determines which files are included
# in the import.
#
# The categories of greatest importance are defined in terms of three
# questions:
#
# 1) If arch makes a local copy of this tree, should this file be included
#    in the copy?
#
# 2) Is it generally safe to remove this file based only on how it is named?
#    For example, can it be safely clobbered by a new file of the same name?
#
# 3) Should this file be archived along with the project?  For example,
#    should it be included when importing the project for the first time?
#
# The primary categories are:
#
# category:      copy locally?       safe to clobber?      archive?
#
# junk           no                  yes                   no
# backup         no                  no                    no
# precious       yes                 no                    no
# source         yes                 no                    yes
#
# There are two additional categories, unrelated to those questions:
#
# excluded -- during a traversal by inventory, this file (and,
#             if a directory, its contents) are simply ignored unless the
#             --all flag is specified.   This category is usually used to
#             omit arch's own control files from a listing.
#
# unrecognized -- a category for files whose name fits no other pattern.
#             Usually, the presence of unrecognized files is treated as an
#             error.   You can use the naming conventions to define certain
#             names as "deliberately unrecognized" -- i.e., filenames whose
#             presence in a source tree you _want_ to be treated as an error
#
# The traveral algorithm is described here, along with lines you can edit to
# customize the naming conventions.
#
# Starting at "." within a project tree (usually at the root of the
# project tree) consider each filename in that directory.
#
# The files "." and ".." are simply ignored.
#
# Files containing "illegal characters" are characterized as unrecognized.
# If they are directories, traversal does _not_ descend into those directories.
# Currently, the illegal characters are *, ?, [, ], \, space, and tab.
# (The set of illegal characters may shrink in future releases.)
#
# In an interactive call to inventory _without_ the --all flag,
# names are next compared to the exclude regexp defined here.  Those that
# are ignored and not descended below.  (Most arch operations performing
# traversals internally, e.g. import, do not use this pattern
# and skip this step of the algorithm.
#

exclude ^(.arch-ids|\{arch\}|\.arch-inventory)$

# If the file has a name that begins with "++", it is categorized as
# _precious_.  Names of this form are hard-wired and reserved for use by arch
# itself.  Traversal does not descend into precious directories, but when a
# precious directory is copied, its contents are recursively copied.
#
# Files and directories that reach this stage and which arch recognizes as its
# own control files are classified at this step as source.   Traversal _does_
# descend into source directories.
#
# If the file has a name that begins with ",,", it is categorized as _junk_.
# Names of this form are hard-wired and reserved for use by arch and other tools,
# and arch may clobber such files without warning.  In a project tree, when no 
# arch commands are running, it is safe for users to delete any ",," files. 
# Although the general rule for junk files is that arch is free to clobber them,
# in fact, arch will only ever clobber files starting with ",,".
#
# Traversal does not descend into junk directories.
#
# For your convenience, at this step of the traversal, you can classify
# additional files as junk or precious:
#

junk ^(,.*)$

precious ^(\+.*|\.gdbinit|\.#ckpts-lock|=build\.*|=install\.*|CVS|CVS\.adm|RCS|RCSLOG|SCCS|TAGS|\.svn)$

# Files matching the following regexp are classified as backup files, and
# traversal does not descend into backup directories:
#

backup ^.*(~|\.~[0-9]+~|\.bak|\.swp|\.orig|\.rej|\.original|\.modified|\.reject)$

# If you want to force certain filenames to be treated as errors when present,
# you can add them to the regexp for deliberately unrecognized files.  Traversal
# does not descend into unrecognized directories.

unrecognized ^(.*\.(o|a|so|core|so(\.[[:digit:]]+)*)|core)$

# Files which match the following pattern are treated as source files.
# Traversal _does_ descend into source directories:

source ^[_=a-zA-Z0-9].*$

# Any files not classified by the above rules are classified as unrecognized.
# Traversal does not descend into unrecognized directories.

